import { useRouter } from "vue-router";
import { emitter } from "@/utils/mitt";

export function loadIndependPage() {
  const router = useRouter();
  function gotoPage(path: string) {
    router.push(path);
    emitter.emit("setActivePath", { curPath: router.currentRoute.value.fullPath, activePath: path });
  }
  return {
    gotoPage
  };
}
